package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;

import java.util.List;
import java.util.Map;

public interface MemberDao {
    public List<Member> findAll();
    public Page<Member> selectByCondition(String queryString);
    public void add(Member member);
    public void deleteById(Integer id);
    public Member findById(Integer id);
    public Member findByTelephone(String telephone);
    public void edit(Member member);
    public Integer findMemberCountBeforeDate(String date);
    public Integer findMemberCountByDate(String date);
    public Integer findMemberCountAfterDate(String date);
    public Integer findMemberTotalCount();

    /**
     * 根据日期查询会员的数量
     * @param month
     * @return
     */
    Integer findMemberCount(String month);

    /**
     * 查询套餐详情与每个套餐被下单的数量，用作制作套餐报表
     * @return
     */
    List<Map> getSetmealReport();

    /**
     * 根据性别制作报表
     * @return
     */
    List<Map> getMemberBySexReport();

    /**
     * 根据年龄段制作报表
     * @return
     */
    List<Map> getMemberByAgeReport();
}
